<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf8">
    <title>test</title>
  </head>
  <body>
	  <h1>it works!</h1>
    <h2>
      <ol>
        <li>Press Ctrl+Alt+i. Console will print "hello world" !</li>
        <li>Press Ctrl+q. This app will quit!</li>
      </ol>
    </h2>
    <script type="text/javascript">
      var gui = require('nw.gui');
      var win = gui.Window.get();
      var menubar = new gui.Menu({ type: 'menubar' });

      var menubar_file = new gui.MenuItem({"label":"File"});
      var file_menu = new gui.Menu();
      var file_quit_item = new gui.MenuItem({
        "label":"Quit",
        "click":function(){
          gui.App.quit();
        },
        "key":"q",
        "modifiers":"ctrl"
      });
      var file_info_item = new gui.MenuItem({
        "label":"Info",
        "click":function(){
          console.log("hello world");
        },
        "key":"i",
        "modifiers":"ctrl+alt"
      });
      file_menu.append(file_info_item);
      file_menu.append(file_quit_item);

      var file_about_item = new gui.MenuItem({
        "label":"About us!",
        "key":"U",
        "modifiers":"ctrl",
        "click":function(){
          console.log("About Info");
        }
      });
      file_menu.insert(file_about_item,0);

      menubar_file.submenu = file_menu;
      menubar.append(menubar_file);
      win.menu = menubar;

    </script>
  </body>
</html>
    
